package com.csqiusheng.zyydt.http

import com.csqiusheng.base.bean.ResultBean
import com.csqiusheng.zyydt.bean.*
import okhttp3.MultipartBody
import retrofit2.http.*

interface ApiService {
    /**
     *首页搜索
     */
    @GET("/app/v1/admission/home/search")
    suspend fun search(@Query("content") content: String? = null): ResultBean<MutableList<Search>>

    /**
     *查询省份
     */
    @GET("/app/v1/common/province/list")
    suspend fun getProvinceList(): ResultBean<MutableList<Province>>

    /**
     *查询市区
     */
    @GET("/app/v1/common/city/list")
    suspend fun getCityList(@Query("provinceCode") provinceCode: String): ResultBean<MutableList<City>>

    /**
     *查询县
     */
    @GET("/app/v1/common/area/list")
    suspend fun getAreaList(@Query("cityCode") cityCode: String? = null): ResultBean<MutableList<Area>>

    /**
     *查询学校
     */
    @GET("/app/v1/common/school/list")
    suspend fun getSchoolList(@Query("area") areaCode: String? = null): ResultBean<MutableList<School>>

    /**
     *获取一分一段和省控线目录
     */
    @GET("/app/v1/admission/get/score/line/filter")
    suspend fun getLineFilter(): ResultBean<LineFilter>

    /**
     *获取一分一段
     */
    @GET("/app/v1/admission/get/penny/period")
    suspend fun getProvincialControlBranch(@Query("year") year: String): ResultBean<ProvincialControlBranch>


    /**
     *获取省控线
     */
    @GET("/app/v1/admission/get/score/line")
    suspend fun getProvincialControlLine(@Query("year") year: String): ResultBean<MutableList<ProvincialControlLine>>

    /**
     *单文件上传
     */
    @Multipart
    @POST("/app/v1/common/file")
    suspend fun upFile(@Part file: MultipartBody.Part): ResultBean<UpFile>

    /**
     *获取招生计划目录
     */
    @GET("/app/v1/admission/get/university/plan/filter")
    suspend fun getRecruitStudentsFilter(@Query("universityId") id: String): ResultBean<RecruitStudentsFilter>

    /**
     *获取招生计划目录
     */
    @GET("/app/v1/admission/get/university/plan/list")
    suspend fun getRecruitStudentsList(
        @Query("universityId") id: String,
        @Query("year") year: String?,
        @Query("typeName") typeName: String?,
        @Query("batchName") batchName: String?,
    ): ResultBean<MutableList<RecruitStudentsSchool>>

    /**
     *距高考多少天
     */
    @GET("/app/v1/common/from/entrance/exam")
    suspend fun getExamNumber(): ResultBean<String>

    /**
     *获取最新头条
     */
    @GET("/app/v1/common/head/line/list")
    suspend fun getHeadlinesList(): ResultBean<MutableList<Headlines>>

    /**
     *获取最新公告
     */
    @GET("/app/v1/common/notice/info")
    suspend fun getNotice(): ResultBean<Headlines>

    /**
     *查询省份
     */
    @GET("/app/v1/common/province/model/list")
    suspend fun getProvinceModelList(): ResultBean<ExamYearModel>
}